package com.guoxin.designpattern.chapter4;

/**
 * @author guoxin
 * @date 2019/9/3
 */
public abstract class Observer {

    protected final Subject subject;

    public Observer(Subject subject) {
        this.subject = subject;
        subject.addObserver(this);
    }

    protected abstract void update();
}
